package org.wen.soft.asm.model;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class LoadField {

    int access;
    String name;
    String descriptor;   // 无泛型的类型
    String signature;    // 带泛型的类型（无泛型时为null）
    Object value;

    List<LoadAnnotation> loadAnnotations = new ArrayList<LoadAnnotation>();

    public LoadField(int access, String name, String descriptor, String signature, Object value) {
        this.access = access;
        this.name = name;
        this.descriptor = descriptor;
        this.signature = signature;
        this.value = value;
    }

    public void addLoadAnnotation(LoadAnnotation loadAnnotation) {
        loadAnnotations.add(loadAnnotation);
    }
}
